import request from '@/utils/request'

// 查询项目列表
export function getSuppliers() {
  return request({
    url: '/supchase/index/findSupplier',
    method: 'get',
  })
}

export function getPur(query) {
  return request({
    url: '/supchase/index/findOnePurchase/'+query,
    method: 'get',

  })
}

export function getDrugTypes() {
  return request({
    url: '/Purch_drug/detail/findAllType',
    method: 'get',

  })
}
export function getAllDrug(drugForm,showedDrugIds) {
  return request({
    url: '/Purch_drug/detail/findAllDrug/'+showedDrugIds,
    method: 'get',
    params:drugForm

  })
}

export function sureDrug(purchase) {
  return request({
    url: '/Purch_drug/detail/sureDrug',
    method: 'post',
    data:purchase

  })
}



export function getDrug(query) {
  return request({
    url: '/Purch_drug/detail/findAllDrugByPurOrderId/'+query,
    method: 'get',

  })
}

// 查询项目列表
export function listPurchase(query) {
  return request({
    url: '/supchase/index/findAllPurchase',
    method: 'get',
    params: query
  })
}

// 订单详情药品删除
export function deletePurDrug(queryParams,drugId) {
  return request({
    url: '/Purch_drug/detail/deletePurDrug/' + drugId,
    method: 'get',
    params:queryParams
  })
}

// 新增项目
export function addExam_cost(data) {
  return request({
    url: '/system/exam_cost/add',
    method: 'post',
    data: data
  })
}

// 修改项目
export function updateExam_cost(data) {
  return request({
    url: '/system/exam_cost/update',
    method: 'put',
    data: data
  })
}



// 删除项目
export function delExam_cost(deptsIds) {
  return request({
    url: '/system/exam_cost/' + deptsIds,
    method: 'delete'
  })
}



